package main

import "fmt"

func printArr([5]string) {
	//	【】string是切片类型
}
func main() {

	//var courses [10]string
	//var courses = [5]string{"django", "scrapy", "tornado"}
	//courses := [5]string{"django", "scrapy", "tornado"}
	//fmt.Println(courses)
	var a = [4]float32{1.0}
	fmt.Println(a)
	var b = [5]int{'A', 'B'}
	fmt.Println(b)

	d := [...]int{1, 2, 3, 4, 5}
	fmt.Println(d)
	e := [5]int{4: 100}
	fmt.Println(e)
	fmt.Println(len(e))
	sum := 0
	//for _, value := range d {
	//	sum += value
	//}
	fmt.Println(sum)
	for i := 0; i < len(d); i++ {
		sum += d[i]
	}
	fmt.Println(sum)

	couseA := [3]string{"django", "scrapy", "tornado"}
	couseB := [...]string{"django", "scrapy", "tornado", "python+go", "asyncio"}
	fmt.Printf("%T %T", couseA, couseB)
	//printArr(couseB)
}
